<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Trumbowyg by Alex-D</title>
    <link rel="stylesheet" href="trumbowyg/design/css/trumbowyg.css">
    <style type="text/css">
        html, body {
            margin: 0;
            padding: 0;
            background-color: #F2F2F2;
            font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
        }
        header {
            text-align: center;
        }
        #main {
            max-width: 960px;
            margin: 0 auto;
        }
    </style>
</head>

<body>
<div id="main" role="main">
    <form action="#">
        <div id="simple-editor">
            <h2>This editor is the default build of Trumbowyg.</h2>
            <p>
                Lorem ipsum dolor sit amet, consectetur adipisicing elit. Possimus, aliquam, minima fugiat placeat
                provident optio nam reiciendis eius beatae quibusdam!
            </p>
            <p>
                The text is derived from Cicero's De Finibus Bonorum et Malorum (On the Ends of Goods and Evils, or
                alternatively [About] The Purposes of Good and Evil ). The original passage began: Neque porro quisquam
                est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit (Translation: &quot;Neither is
                there anyone who loves grief itself since it is grief and thus wants to obtain it&quot;).
            </p>
        </div>
        <div id="customized-buttonpane" class="editor">
            <h2>This is a demo of Trumbowyg with a customized button pane</h2>
            <p>
                The text is derived from Cicero's De Finibus Bonorum et Malorum (On the Ends of Goods and Evils, or
                alternatively [About] The Purposes of Good and Evil ). The original passage began: Neque porro quisquam
                est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit (Translation: &quot;Neither is
                there anyone who loves grief itself since it is grief and thus wants to obtain it&quot;).
            </p>
            <p style="text-align: center;">
                <img src="http://alex-d.github.com/Trumbowyg/img/html5.png" alt="Blabla dans le alt">
            </p>
            <p>
                Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dignissimos, minima, asperiores libero
                architecto sequi fugit dolore sunt in officiis facere ut quaerat ullam laudantium delectus aliquam
                tenetur alias! Ea, nisi, est earum temporibus dolores quas qui repellendus aliquid voluptatibus tempore
                facilis eligendi omnis reiciendis nihil ullam quo dolorem nam deleniti. Fugit dignissimos dolorum dolore
                voluptate repudiandae recusandae debitis. Neque, adipisci, maiores magni aliquam molestiae ex natus
                minus quod tempora nemo debitis eum laboriosam voluptatum ut architecto animi nobis vero quis dolore
                eaque! Corporis, dolore, illum, autem in eum ea doloribus ut consequuntur modi et ullam adipisci
                blanditiis corrupti ab voluptate.
            </p>
            <p>
                It is not known exactly when the text acquired its current standard form; it may have been as late as
                the 1960s. The passage was discovered by Richard McClintock, a Latin scholar who is the publications
                director at Hampden-Sydney College in Virginia, by searching for citings of the rarely used word
                'consectetur' in classical literature.
            </p>
        </div>
        <textarea id="form-content" class="editor" cols="30" rows="10">
                    <h1>This editor is create from a textarea</h1>
                    <p>
                        Even though using &quot;lorem ipsum&quot; often arouses curiosity due to its resemblance to classical Latin, it is not intended to have meaning. Where text is visible in a document, people tend to focus on the textual content rather than upon overall presentation, so publishers use lorem ipsum when displaying a typeface or design in order to direct the focus to presentation. &quot;Lorem ipsum&quot; also approximates a typical distribution of spaces in English. <br>
                        The most common lorem ipsum text reads as follows: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
                    </p>
        </textarea>
    </form>
</div>
<script src="http://www.jq22.com/jquery/1.8.3/jquery.min.js"></script>
<script src="trumbowyg/trumbowyg.js"></script>
<script src="trumbowyg/langs/fr.js"></script>
<script src="trumbowyg/plugins/upload/trumbowyg.upload.js"></script>
<script src="trumbowyg/plugins/base64/trumbowyg.base64.js"></script>
<script>
    /** Default editor configuration **/
    $('#simple-editor').trumbowyg();
    /********************************************************
     * Customized button pane + buttons groups + dropdowns
     * Use upload plugin
     *******************************************************/
    /*
     * Add your own groups of button
     */
    $.trumbowyg.btnsGrps.test = ['bold', 'link'];
    /* Add new words for customs btnsDef just below */
    $.extend(true, $.trumbowyg.langs, {
        fr: {
            align: 'Alignement',
            image: 'Image'
        }
    });

    $('#customized-buttonpane').trumbowyg({
        lang: 'fr',
        closable: true,
        fixedBtnPane: true,
        btnsDef: {
            // Customizables dropdowns
            align: {
                dropdown: ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
                ico: 'justifyLeft'
            },
            image: {
                dropdown: ['insertImage', 'upload', 'base64'],
                ico: 'insertImage'
            }
        },
        btns: ['viewHTML',
            '|', 'formatting',
            '|', 'btnGrp-test',
            '|', 'align',
            '|', 'btnGrp-lists',
            '|', 'image']
    });
    /** Simple customization with current options **/
    $('#form-content').trumbowyg({
        lang: 'fr',
        closable: true,
        mobile: true,
        fixedBtnPane: true,
        fixedFullWidth: true,
        semantic: true,
        resetCss: true,
        autoAjustHeight: true,
        autogrow: true
    });


    $('.editor').on('dblclick', function (e) {
        $(this).trumbowyg({
            lang: 'fr',
            closable: true,
            fixedBtnPane: true
        });
    });
</script>
</body>
</html>

